﻿using System;
using HslCommunication.BasicFramework;

namespace HslCommunication.Core
{
	/// <summary>
	/// 单个文件的存储信息，用来表示在文件目录管理器里表示所有的文件信息的<br />
	/// Storage information of a single file, used to represent all file information in the file directory manager
	/// </summary>
	// Token: 0x02000132 RID: 306
	public class GroupFileItem
	{
		/// <summary>
		/// 文件的名称
		/// </summary>
		// Token: 0x17000557 RID: 1367
		// (get) Token: 0x060019B3 RID: 6579 RVA: 0x00080EE7 File Offset: 0x0007F0E7
		// (set) Token: 0x060019B4 RID: 6580 RVA: 0x00080EEF File Offset: 0x0007F0EF
		public string FileName { get; set; }

		/// <summary>
		/// 文件的大小
		/// </summary>
		// Token: 0x17000558 RID: 1368
		// (get) Token: 0x060019B5 RID: 6581 RVA: 0x00080EF8 File Offset: 0x0007F0F8
		// (set) Token: 0x060019B6 RID: 6582 RVA: 0x00080F00 File Offset: 0x0007F100
		public long FileSize { get; set; }

		/// <summary>
		/// 文件的映射名称
		/// </summary>
		// Token: 0x17000559 RID: 1369
		// (get) Token: 0x060019B7 RID: 6583 RVA: 0x00080F09 File Offset: 0x0007F109
		// (set) Token: 0x060019B8 RID: 6584 RVA: 0x00080F11 File Offset: 0x0007F111
		public string MappingName { get; set; }

		/// <summary>
		/// 文件的下载次数
		/// </summary>
		// Token: 0x1700055A RID: 1370
		// (get) Token: 0x060019B9 RID: 6585 RVA: 0x00080F1A File Offset: 0x0007F11A
		// (set) Token: 0x060019BA RID: 6586 RVA: 0x00080F22 File Offset: 0x0007F122
		public long DownloadTimes { get; set; }

		/// <summary>
		/// 文件的上传时间
		/// </summary>
		// Token: 0x1700055B RID: 1371
		// (get) Token: 0x060019BB RID: 6587 RVA: 0x00080F2B File Offset: 0x0007F12B
		// (set) Token: 0x060019BC RID: 6588 RVA: 0x00080F33 File Offset: 0x0007F133
		public DateTime UploadTime { get; set; }

		/// <summary>
		/// 文件的上传人，拥有者
		/// </summary>
		// Token: 0x1700055C RID: 1372
		// (get) Token: 0x060019BD RID: 6589 RVA: 0x00080F3C File Offset: 0x0007F13C
		// (set) Token: 0x060019BE RID: 6590 RVA: 0x00080F44 File Offset: 0x0007F144
		public string Owner { get; set; }

		/// <summary>
		/// 文件的额外描述
		/// </summary>
		// Token: 0x1700055D RID: 1373
		// (get) Token: 0x060019BF RID: 6591 RVA: 0x00080F4D File Offset: 0x0007F14D
		// (set) Token: 0x060019C0 RID: 6592 RVA: 0x00080F55 File Offset: 0x0007F155
		public string Description { get; set; }

		/// <summary>
		/// 获取文件的大小描述<br />
		/// Get file size description
		/// </summary>
		/// <returns>文件大小的字符串描述形式</returns>
		// Token: 0x060019C1 RID: 6593 RVA: 0x00080F5E File Offset: 0x0007F15E
		public string GetTextFromFileSize()
		{
			return SoftBasic.GetSizeDescription(this.FileSize);
		}

		/// <inheritdoc />
		// Token: 0x060019C2 RID: 6594 RVA: 0x00080F6B File Offset: 0x0007F16B
		public override string ToString()
		{
			return string.Concat(new string[]
			{
				"GroupFileItem[",
				this.FileName,
				":",
				this.MappingName,
				"]"
			});
		}
	}
}
